class Person:
    # name = '张三'
    # age = '26'
    # gender = '男'

    def __init__(self,name,age,gender):
        self.name = name
        self.age = age
        self.gender = gender
        print("-------调用构造方法创建了对象{}--------".format(self.name))
    def eat(self):
        print("人要吃饭")
    def sleep(self):
        print("人要睡觉")
    # def setName(self,name):
    #     self.name = name
    #     print("我的名字是{}".format(name))
    # def setAge(self,age):
    #     self.age = age
    # def setGender(self,gender):
    #     self.gender = gender
    def toString(self):
        print("我叫{}，我今年{}岁了，我是一个{}孩子".format(self.name,self.age,self.gender))

    def __del__(self):
        print("........调用析构方法，删除对象{}........".format(self.name))